
<template>
  <div style="height:100%;width:100%;position:relative;">
    <div class="pagetop">
      <div class="search-title">样本库</div>
      <el-select v-model="selCodeno" style="width:150px" @change="SwitchTree" clearable ref="refSelCodeno">
        <el-option v-for="(item, index) in selSmpLibrary_Options" :key="index" :value="item.librid"
          :label="item.librname"></el-option>
      </el-select>
    </div>
    <div class="pagecenter">
      <rm-layout-left :fixsize=500 :splitwidth=3 :minfixsize=200 :maxflxsize=2000>
        <template v-slot:fix>
          <div class="tree">
            <el-tree :props="treeProps" :load="LoadNode" node-key="locationid" lazy
              :default-expanded-keys="defaultExpandKeys" @node-click="NodeClick" @node-contextmenu="RightClick"
              :highlight-current="true" ref="tree" :render-content="RenderContent" :render-after-expand="true"
              empty-text="请先选择对应的样本库">
            </el-tree>
          </div>
        </template>
        <div style="width:100%;float:left;height:100%;border:1px solid #ccc;overflow:auto;">
          <template>
            <div v-for="msg in showDiv" :key="msg.title" style="over-flow:auto">
              <h3 style="color:white;background-color:grey; margin:3px;font-size: 15px;padding: 5px 0 5px 10px;">{{ msg }}
              </h3>
            </div>
          </template>
        </div>
        <!-- 编辑弹窗 -->
        <el-dialog v-el-drag-dialog :close-on-click-modal="false" :center="true" :title="locationTitle"
          :visible.sync="bLocVisable" width="600px">
          <table class="edit" style="padding:5px;border-collapse:separate; border-spacing:3px 4px;">
            <tr>
              <td style="color:#F56C6C">样本库</td>
              <td colspan=3>
                <el-select v-model="editData.librid" filterable style="width:100%" :disabled="true">
                  <el-option v-for="(item, index) in editSmpLibrary_Options" :key="index" :value="item.librid"
                    :label="item.librname"></el-option>
                </el-select>
              </td>
            </tr>
            <tr>
              <td style="color:#F56C6C">库位ID</td>
              <td>
                <el-input style="width:100%;" v-model="editData.locationid" :disabled="true"></el-input>
              </td>
              <td style="color:#F56C6C">上级库位ID</td>
              <td>
                <el-input style="width:100%;" v-model="editData.parentlocname" :disabled="true"></el-input>
              </td>
            </tr>
            <tr>
              <td style="color:#F56C6C">库位编号</td>
              <td colspan=3>
                <el-input v-model="editData.locationcode" :disabled="true"></el-input>
              </td>
            </tr>
            <tr>
              <td style="color:#F56C6C">级别</td>
              <td>
                <el-input style="width:100%;" v-model="editData.level" :disabled="true"></el-input>
              </td>
              <td>序号</td>
              <td>
                <el-input v-model="editData.seq"></el-input>
              </td>
            </tr>
            <tr>
              <td>位置名称</td>
              <td>
                <el-input v-model="editData.locationname"></el-input>
              </td>
              <td v-if="bShowLastFlag" style="color:#F56C6C">最后一级</td>
              <td>
                <el-checkbox v-if="bShowLastFlag" style="width:100%;" v-model="editData.lastflag" @change="LastFlagChange"
                  true-label="1" false-label="0"></el-checkbox>
              </td>
            </tr>
            <tr>
              <td>位置说明</td>
              <td colspan=3>
                <el-input v-model="editData.description"></el-input>
              </td>
            </tr>
            <tr>
              <td>用途</td>
              <td colspan=3>
                <el-input v-model="editData.usedesc"></el-input>
              </td>
            </tr>
            <tr>
              <td>所属工作组</td>
              <td colspan=3>
                <rm-ddl-common :appendtobody="true" @change="LabgroupChange" datatype="labgroup" dataname="检验工作组"
                  width="100%" v-model="editData.labgroupid" style="text-align:center"></rm-ddl-common>
              </td>
            </tr>
            <tr>
              <td>入库条件</td>
              <td colspan=2>
                <el-select v-model="editData.validtypeno" filterable style="width:100%" clearable>
                  <el-option v-for="(item, index) in editSmplocvalitype_Options" :key="index" :value="item.validtypeno"
                    :label="item.validtypename"> <span style="float: left">{{ item.validtypename }}</span>
                    <span style="float: right; color: #8492a6; font-size: 13px">{{ item.validtypeno }}</span>
                  </el-option>
                </el-select>
              </td>
              <td style="text-align:left;padding-left:5px">
                <el-button @click="popOpen">编辑</el-button>
                <b style="color:#F56C6C">若新增则不选</b>
              </td>
            </tr>
            <tr>
              <td style="color:#F56C6C">库位类型</td>
              <td>
                <el-select v-model="editData.loctypeno" filterable style="width:100%" ref="refloctypeno">
                  <el-option v-for="(item, index) in editSmpLocType_Options " :key="index" :value="item.loctypeno"
                    :label="item.loctypename"></el-option>
                </el-select>
              </td>
              <td>库位温度</td>
              <td>
                <el-input style="width:100%;" v-model="editData.locationtemp" @change="IsNumber"></el-input>
              </td>
            </tr>
            <tr>
              <td>可放置架子类型</td>
              <td>
                <el-select v-model="editData.shelftype" style="width:100%;" placeholder="请选择" no-data-text="最后一级库位可设置架子类型"
                  :disabled="!bIsLastEdit" @change="GetPosNumber">
                  <el-option v-for="item in editSmpShelf_Options" :key="item.shelftypeno" :label="item.shelftypename"
                    :value="item.shelftypeno">
                  </el-option>
                </el-select>
              </td>
              <td>当前标本架编号</td>
              <td>
                <!-- <el-input style="width:100%;" v-model="editData.shelfid" :disabled="true"></el-input> -->
                <el-select v-model="editData.shelfid" style="width:100%;" placeholder="请选择" :disabled="!bIsLastEdit"
                  @change="GetShelfPosNumber">
                  <el-option v-for="item in editSmpShelfList_Options" :key="item.shelfid" :label="item.shelfno"
                    :value="item.shelfid">
                  </el-option>
                </el-select>
              </td>
            </tr>
            <tr>
              <td>可放置标本数</td>
              <td>
                <el-input style="width:100%;" v-model="editData.posnumber" :disabled="true"></el-input>
              </td>
              <td>已放置标本数</td>
              <td>
                <el-input style="width:100%;" v-model="editData.occupynumber" :disabled="true"></el-input>
              </td>
            </tr>
            <tr>
              <td>创建人</td>
              <td>
                <!-- 修复创建人名称显示问题 -->
                <rm-ddl-common datatype="userinfo" dataname="用户" v-model="editData.createuser" width="100%"
                  :disabled="true"></rm-ddl-common>
              </td>
              <td>创建时间</td>
              <td>
                <el-input style="width:100%;" v-model="editData.createdt" :disabled="true"></el-input>
              </td>
            </tr>
          </table>
          <div style="text-align:right;padding-top:15px">
            <el-button @click="btnSave()">确定</el-button>
            <el-button @click="bLocVisable = false">取消</el-button>
          </div>
        </el-dialog>
        <!-- 库位分类表达式弹窗 -->
        <el-dialog title="库位分类表达式" :visible.sync="bLalidFormulaVisible" v-el-drag-dialog :close-on-click-modal="false"
          height="600px" width="800px" :destroy-on-close="true">
          <el-dialog :append-to-body="true" :close-on-click-modal="false" title="样本类型" :visible.sync="bSpecimenVisible">
            <rm-pop-common @change="SpecimenChange" @cancel="bSpecimenVisible = false;" datatype="specimen"
              :multiple="false"></rm-pop-common>
          </el-dialog>
          <el-form>
            <el-row>
              <div style="width:100%;float:left">
                <el-input type="textarea" v-model="formulaNData" ref="refformulaNData" readonly="readonly"
                  disabled="disabled" id="nameDiv"></el-input>
              </div>
              <div style="width:100%;float:left;margin-top:5px">
                <el-input type="textarea" v-model="formulaCData" ref="refformulaCData" id="codeDiv"
                  @input="TargetInput"></el-input>
              </div>
            </el-row>
            <el-row>
              <div style="height:400px;border:1px solid #CCC;margin-top:5px">
                <div style="width:100%;float:left;height:35px;float:center">
                  <tr>
                    <td>字段查询</td>
                    <td>
                      <el-input v-model.trim="inputSearch" style="width:250px" placeholder="字段名称|字段代码"
                        @keyup.enter.native="DocInputSearch"></el-input>
                    </td>
                  </tr>
                </div>
                <div
                  style="right:255px;left:0px;position:absolute;float:left;height:365px;top:40px;border: 1px solid #ccc;overflow:auto;">
                  <vxe-table show-overflow ref="locvaliXTable" height="auto" row-id="id" :data.sync="popXTableData"
                    show-header-overflow highlight-current-row highlight-hover-row resizable border
                    @current-change="popPrintChangeEvent" size="mini">
                    <vxe-table-column type="index" title="NO." width="40"></vxe-table-column>
                    <vxe-table-column field="col_name" title="字段名称" width="130" sortable
                      header-align="center"></vxe-table-column>
                    <vxe-table-column field="col_label" title="提示文字" width="130" sortable
                      header-align="center"></vxe-table-column>
                    <vxe-table-column field="col_code" title="字段代码" width="130" header-align="center"></vxe-table-column>
                    <vxe-table-column field="valuelist" title="取值" width="300" sortable header-align="center"
                      :edit-render="{ name: 'input', autoselect: true }"></vxe-table-column>
                  </vxe-table>
                </div>
                <div style="width:255px;float:left;height:365px;position:absolute;right:0px;top:35px">
                  <div style="position:realative;height:60%;width:100%">
                    <table style="width:100%">
                      <tr>
                        <td style="#F56C6C">入库条件代码</td>
                      </tr>
                      <el-input v-model="popData.validtypeno" :disabled="bIsValidEdit" @change="chkValidtypeNo"
                        ref="refvalidtypeno"></el-input>
                      <tr>
                      <tr>
                        <td style="#F56C6C">入库条件名称</td>
                      </tr>
                      <el-input v-model="popData.validtypename" ref="refvalidtypename"></el-input>
                      <tr>
                        <td>库位分单描述</td>
                      </tr>
                      <tr>
                        <td>
                          <el-input :rows="3" type="textarea" v-model="popData.description"
                            ref="refdescription"></el-input>
                        </td>
                      </tr>
                    </table>
                  </div>
                  <div style="text-align:center;position:realative;height:40%;">
                    <table style="text-align:center;width:100%;">
                      <tr>
                        <td>
                          <el-button style="margin:4px;width:80px;" @click="Operate('AND')">并且</el-button>
                          <el-button style="margin:4px;width:80px;" @click="Operate('OR')">或者</el-button>
                        </td>
                      </tr>
                      <tr>
                        <td>
                          <el-button style="margin:4px;width:80px" @click="Operate('(')">(</el-button>
                          <el-button style="margin:4px;width:80px" @click="Operate(')')">)</el-button>
                        </td>
                      </tr>
                      <tr>
                        <td>
                          <el-button style="margin:4px;width:80px" @click="popBtnSpecimen">样本类型</el-button>
                          <el-button style="margin:4px;width:80px" @click="popBtnClean">清空</el-button>
                        </td>
                      </tr>
                      <tr>
                        <td>
                          <el-button style="margin:4px;width:80px;" @click="popSave">确定</el-button>
                          <el-button style="margin:4px;width:80px;"
                            @click="bLalidFormulaVisible = false; this.popData = []" :autofocus="true">取消</el-button>
                        </td>
                      </tr>
                    </table>
                  </div>
                </div>
              </div>
            </el-row>
          </el-form>
        </el-dialog>
        <!-- 删除弹窗 -->
        <el-dialog v-el-drag-dialog :append-to-body="true" :close-on-click-modal="false" title="提示"
          :visible.sync="bDelVisable" width="500px" height="300px">
          <span class="el-icon-warning">确定删除<b> 库位:</b><b style="color:#F56C6C">{{ delNa }} </b>的记录吗？</span>
          <span slot="footer" class="dialog-footer">
            <el-button type="primary" @click="btnDelComfirm">确 定</el-button>
            <el-button @click="btnCancel(1)" :autofocus="true">取 消</el-button>
          </span>
        </el-dialog>
        <!-- 复制弹窗 -->
        <el-dialog v-el-drag-dialog :append-to-body="true" :close-on-click-modal="false" title="复制"
          :visible.sync="bCopyVisable" width="650px" height="300px" v-if="bDiagx">
          <span style="color:#F56C6C;display:block; font-size: 14px;">复制库位:{{ cObject.name }}</span>
          <span style="color:#F56C6C;display:block; font-size: 14px;">上级库位:{{ cFather.name }}</span>
          <table height="60px" width="100%">
            <tr nowrap width="100%" class="search-title">
              <td align="right">号数</td>
              <td width="150px">
                <el-input v-model.trim="dlgCopyData.startNum" type="number" @input="GetNum" placeholder=""
                  style="width:60px"></el-input>到
                <el-input v-model.trim="dlgCopyData.endNum" type="number" @input="GetNum" placeholder=""
                  style="width:60px"></el-input>
              </td>
              <td class="search-title">共计{{ dlgCopyData.sumNum }}条</td>
            </tr>
            <tr nowrap width="100%">
              <td class="search-title" align="right">位置名称
              </td>
              <td colspan="2">
                <el-input v-model.trim="dlgCopyData.uhLocNa" placeholder="" style="width:110px;"
                  id="innerRight"></el-input>
                <el-input v-model="dlgCopyData.showNumArr" placeholder="" disabled style="width:70px"
                  v-if="bIsCn == false"></el-input>
                <el-input v-model="dlgCopyData.showNumArrNa" placeholder="" disabled style="width:70px"
                  v-if="bIsCn == true"></el-input>
                <el-input v-model.trim="dlgCopyData.lhLocNa" placeholder="" style="width:110px"></el-input>
              </td>
              <td>
                <el-checkbox v-model="bIsCn">转中文数</el-checkbox>
              </td>
            </tr>
          </table>
          <el-collapse v-model="activeNames" name="1">
            <el-collapse-item>
              <template slot="title">
                使用帮助<i class="header-icon el-icon-info"></i>
              </template>
              <p>如想复制添加15个冷冻架，命名第一、二、三……列冷冻架，</p>
              <p>可参考下方填写流程:</p>
              <p>号数 [1]到[15],</p>
              <p>位置名称 前段:[第],后段:[列冷冻架]</p>
              <p>并勾选[转中文数]</p>
            </el-collapse-item>
          </el-collapse>
          <span slot="footer" class="dialog-footer">
            <el-button type="primary" @click="btnCopySave">确 定</el-button>
            <el-button
              @click="btnCancel(2), bDiagx = false, bCopyVisable = false, cNumArray = [], cCNNumArray = [], dlgCopyData = {}"
              :autofocus="true">取 消</el-button>
          </span>
        </el-dialog>
      </rm-layout-left>
    </div>
  </div>
</template>

<script type="text/javascript">
import { Promise } from "q";
import XEUtils from "xe-utils";
import Contextmenu from "vue-contextmenujs";
export default {
  name: "SMP133",
  data() {
    return {
      bIsCn: false, //显示中文数字
      bDiagx: false, //销毁弹窗数据
      bIsLastEdit: false,
      bIsValidEdit: true,
      bLocVisable: false,
      bDelVisable: false,
      bCopyVisable: false,
      bShowLastFlag: false, //显示最后一级选项按钮
      bSpecimenVisible: false, //库位分类--样本类型
      bLalidFormulaVisible: false, //表达式弹窗
      selCodeno: 1, //样本库null
      locationid: -1, //节点
      fatherlocid: -1, //父节点
      delNa: "", //删除的库位名字
      locationTitle: "", //库位 新增/修改 弹窗 title
      formulaCData: "", //库位分类表达式code
      formulaNData: "", //库位分类表达式name
      inputSearch: "", //库位模糊查询
      EditFlag: "M", //右键菜单 状态标志
      cObject: "", //复制Object
      cNode: "", //复制Node
      cFather: "", // 用于显示复制页面上级库位
      tpNode: {}, //右键获取的临时节点，用于修改后刷新
      prTpNode: {}, //右键获取的临时节点，用于新增后刷新
      editData: {}, //编辑数据
      copyData: {},
      dlgCopyData: {
        startNum: 1,
        endNum: 1,
        sumNum: 1,
        showNumArr: "n",
        showNumArrNa: "n",
        uhLocNa: "", //upper half
        lhLocNa: "", //Lower Half
      },
      popData: {
        //库位表达式弹窗数据
        librid: 0,
        validtypeno: "",
        validtypename: "",
        validformula: "",
        description: "",
      },
      treeProps: {
        label: "name",
        children: "children",
        isLeaf: "leaf",
      },
      cNumArray: [], //复制 数字区间
      cCNNumArray: [], //复制 中文数字区间
      showDiv: [], //右侧显示子节点列表
      activeNames: ["1"],
      defaultExpandKeys: [0], //树状图默认展开节点
      editSmpShelf_Options: [], //架子类型
      selSmpLibrary_Options: [], //样本库
      editSmpLibrary_Options: [], //工作组
      editSmpLocType_Options: [], //库位类型
      editSmplocvalitype_Options: [], //表达式下拉框
      popXTableData: [], //库位弹窗表格数据
      oPopXTableData: [], //库位弹窗表格数据 备份
      editSmpShelfList_Options: [],//架子
      tempeditSmpShelfList_Options: [],//临时架子
    };
  },
  beforeCreate() {

  },
  created() {
    this.ddlSmp_Library();
  },
  mounted() {

  },
  updated() {

  },
  methods: {
    /*-----------------------------初始化-----------------------------*/
    //获取样本库列表
    async ddlSmp_Library() {
      const res = await this.$tool
        .request({
          url: "SMP/SMP1/SMP130",
          method: "post",
          data: {
            action: "q_smp_library",
          },
        })
      if (res) {
        this.selSmpLibrary_Options = res;
        this.selCodeno = this.selSmpLibrary_Options[0].librid;
      }
    },
    //编辑弹窗-标本库
    editSmp_Library() {
      this.$tool
        .request({
          url: "SMP/SMP1/SMP130",
          method: "post",
          data: {
            action: "q_smp_library",
          },
        })
        .then((res) => {
          this.editSmpLibrary_Options = res;
        });
    },
    //编辑弹窗-架子
    editSmp_ShelfList(flag, obj) {
      this.$tool
        .request({
          url: "SMP/SMP1/SMP121",
          method: "post",
          data: {
            action: "smp_shelf_query",
            librid: this.selCodeno,
            usestatus: '3',//只查闲置的。
            flag: flag, //A 新增 E修改
            locationid: obj.locationid,
          },
        })
        .then((res) => {
          this.editSmpShelfList_Options = res.RData.Data; //用于 top 所有架子的下拉查询
          this.tempeditSmpShelfList_Options = XEUtils.clone(res.RData.Data, true);
        });
    },

    //编辑弹窗-架子类型
    editSmp_ShelfId() {
      this.$tool
        .request({
          url: "SMP/SMP1/SMP120",
          method: "post",
          data: {
            action: "q_smp_shelftype",
            librid: this.selCodeno,
          },
        })
        .then((res) => {
          if (res.errcode == "1") {
            this.editSmpShelf_Options = res.dt; //用于 top 架子类型下拉查询
          } else {
            this.editSmpShelf_Options = [];
            // this.$confirm(
            //     res.errormsg,
            //     "提示",
            //     { type: "warning" },
            //     {
            //         confirmButtonText: "立即维护",
            //         cancelButtonText: "取消",
            //     }
            // )
            //     .then(() => {
            //         this.$router.push("/SMP120");
            //     })
            //     .catch(() => {
            //         this.$message({
            //             type: "info",
            //             message: "已取消跳转，稍后您可以手动跳转至 SMP120 样本架类型 页面进行维护。",
            //             showClose: true,
            //         });
            //     });
          }
        });
    },
    //编辑弹窗-库位类型
    async editSmp_LocType() {
      try {
        const res = await this.$tool
          .request({
            url: "SMP/SMP1/SMP131",
            method: "post",
            data: {
              action: "smp_loctype_query",
              librid: this.selCodeno,
            },
          })
          .then((res) => {
            this.editSmpLocType_Options = res.RData.Data;
          });
      } catch (e) {
        this.$alert(e.message, "提示", {
          confirmButtonText: "确定",
          type: "error",
        });
      }
    },
    // ------------------------------左侧树--------------------------//
    //点击事件
    NodeClick(data, node) {
      this.showDiv = [];
      var child = node.childNodes;
      if (child.length > 0) {
        child.forEach((item) => {
          this.showDiv.push(item.data.name);
        });
      }
      this.$refs.tree.setCurrentKey(node.data.locationid);
      this.locationid = this.$refs.tree.getCurrentNode(node.children).locationid;
    },
    //懒加载
    async LoadNode(node, resolve) {
      const res = await this.$tool
        .request({
          url: "SMP/SMP1/SMP130",
          method: "post",
          data: {
            action: "q_smp_library",
          },
        })
      if (res) {
        this.selSmpLibrary_Options = res;

        if (node.level == 0) {
          this.node_had = node;
          this.resolve_had = resolve;
          var data = await this.GetFatherTree(this.selCodeno, this.locationid);
          return resolve(data);
        } else if (node.level >= 1) {
          //展开其他子节点，动态从后台加载下一级节点列表
          var data = await this.GetChildTree(node.data.locationid, node);
          if (data.length == 0) {
            node.leaf = true;
            node.icon = "el-icon-document-copy";
          }
          return resolve(data);
        }
      }
      //展开第一级节点，从后台加载一级节点列表

    },
    //选择对应样本库的树
    SwitchTree() {
      this.locationid = -1;
      this.node_had.childNodes = []; //把存起来的node的子节点清空，避免出现重复树.
      this.LoadNode(this.node_had, this.resolve_had); //再次执行懒加载的方法,载入新的树节点
    },
    //重新加载子节点
    btnRefreshLoc(node) {
      node.loaded = false;
      node.expand(); // 主动调用展开节点方法，重新查询该节点下的所有子节点
    },
    //父节点:加载第一级节点
    async GetFatherTree() {
      try {
        let tempNode = [];
        const res = await this.$tool.request({
          url: "SMP/SMP1/SMP133",
          method: "post",
          data: {
            action: "smp_location_query",
            librid: this.selCodeno,
            locationid: this.locationid,
          },
        });
        if (res.RData.Data) {
          res.RData.Data.forEach((item) => {
            let node = {};
            node.name = item.locationname + " (" + item.locationcode + ")";
            node.locationid = item.locationid;
            node.icon = "el-icon-house";
            tempNode.push(node);
            this.fatherlocid = item.locationid;
          });
        }
        return tempNode;
      } catch (e) {
        this.$alert(e.message, "提示", {
          confirmButtonText: "确定",
          type: "error",
        });
      }
    },
    //子节点:每次加载下一级子节点
    async GetChildTree(locationid, Node) {
      try {
        let tempNode = [];
        const res = await this.$tool.request({
          url: "SMP/SMP1/SMP133",
          method: "post",
          data: {
            action: "smp_location_query_child",
            librid: this.selCodeno,
            locationid: locationid,
          },
        });
        if (res.Data) {
          this.showDiv = [];
          res.Data.forEach((item) => {
            let node = {};
            let msg = item.locationname + " (" + item.locationcode + ")";
            node.name = item.locationname + " (" + item.locationcode + ")";
            node.locationid = item.locationid;
            node.leaf = false;
            if (item.lastflag == 0) {
              if (Node.level == 1) node.icon = "el-icon-mobile";
              if (Node.level == 2) node.icon = "el-icon-document";
              if (Node.level == 3) node.icon = "el-icon-tickets";
              if (Node.level == 4) node.icon = "el-icon-receiving";
              if (Node.level == 5) node.icon = "el-icon-bangzhu";
            } else {
              node.icon = "el-icon-place";
              node.leaf = true;
            }
            tempNode.push(node);
            this.showDiv.push(msg);
          });
        }
        return tempNode;
      } catch (e) {
        this.$alert(e.message, "提示", {
          confirmButtonText: "确定",
          type: "error",
        });
      }
    },
    //右键菜单
    RightClick(e, object, Node, element) {
      this.NodeClick("", Node); //右键点击选中高两行
      this.btnRefreshLoc(Node); //重新刷新节点，用于判断是否有子节点存在
      this.locationid = object.locationid;
      this.$tool
        .request({
          url: "SMP/SMP1/SMP133",
          method: "post",
          data: {
            action: "smp_location_query_islastflag",
            locationid: object.locationid,
            librid: this.selCodeno,
          },
        })
        .then((res) => {
          this.IsLast = res.Data[0].lastflag;
          let isA = true;
          let isE = true;
          let isD = true;
          let isC = true;
          if (Node.level == 1) {
            isA = true;
            isE = false;
            isD = false;
            isC = false;
          } else if (this.IsLast == "1") {
            isA = false;
            isE = true;
            isD = true;
            isC = false;
          }
          this.tpNode = Node; //节点
          this.prTpNode = Node.parent; //父节点
          this.$contextmenu({
            items: [
              {
                label: "新增",
                onClick: () => {
                  this.btnEdit("A", object, Node);
                },
                icon: "el-icon-plus",
                disabled: !isA,
              },
              {
                label: "删除",
                onClick: () => {
                  this.btnDel(Node);
                },
                icon: "el-icon-delete",
                disabled: !isD,
              },
              {
                label: "修改",
                onClick: () => {
                  this.btnEdit("E", object, Node);
                },
                icon: "el-icon-edit",
                disabled: !isE,
              },
              {
                label: "重新读取",
                onClick: () => {
                  this.btnRefreshLoc(Node, object);
                },
                icon: "el-icon-refresh",
              },
              // {
              //     label: "复制",
              //     onClick: () => {
              //         this.btnCopy(object, Node);
              //     },
              //     icon: "el-icon-document-copy",
              //     disabled: !isC,
              // },
            ],
            e,
            x: e.clientX + 20,
            y: e.clientY,
            customClass: "RightBack",
            zIndex: 999,
            minWidth: 120,
            customClass: "background-color: #f8f8f8;border-bottom:solid 1px #e6e6e6",
          });
        })
        .catch((e) => {
          console.log("error", e);
        });
    },
    //节点图标
    RenderContent(h, { node, data, store }) {
      return (
        <span>
          <i class={data.icon}></i>
          <span> {node.label}</span>
        </span>
      );
    },
    /*-----------------------------按钮类-----------------------------*/
    /*左侧树 右键菜单 */
    btnDel(node) {
      this.delNa = node.data.name;
      this.EditFlag = "D";
      this.bDelVisable = true;
    },
    btnCancel(msg) {
      var pushMsg = "";
      if (msg == 1) {
        pushMsg = "删除。";
        this.delNa = "";
        this.bDelVisable = false;
      } else if (msg == 2) {
        pushMsg = "复制。";
      } else {
        pushMsg = "本次操作。";
        this.bCopyVisable = false;
        this.cNumArray = [];
        this.cCNNumArray = [];
      }
      this.EditFlag = "M";
      this.$message({
        type: "info",
        message: "已取消" + pushMsg,
        showClose: true,
      });
    },
    btnDelComfirm() {
      this.bDelVisable = false;
      let that = this;
      this.$tool
        .request({
          url: "SMP/SMP1/SMP133",
          method: "post",
          data: {
            action: "smp_location_delete",
            locationid: this.locationid,
          },
        })
        .then((res) => {
          if (res == "1") {
            this.$message({
              message: "删除成功！",
              type: "success",
              showClose: true,
            });
            this.EditFlag = "M";
            this.delNa = "";
            this.btnRefreshLoc(this.prTpNode);
            //是删除操作
          } else {
            this.$alert(res, "删除失败", {
              confirmButtonText: "确定",
              type: "error",
            });
            this.$message({
              message: "删除失败：" + res,
              type: "error",
              showClose: true,
            });
          }
        })
        .catch((e) => {
          this.$alert(res, "删除失败", {
            confirmButtonText: "确定",
            type: "error",
          });
        });
    },
    //---------------------- 编辑弹窗----------------------------//
    //新增/修改弹窗查询
    async detailQuery4Up(locationid, flag, node) {
      try {
        const res = await this.$tool.request({
          url: "SMP/SMP1/SMP133",
          method: "post",
          data: {
            action: "smp_location_query_update",
            librid: this.selCodeno,
            locationid: locationid,
          },
        });
        if (res.Data) {
          if (flag == "A") {
            this.EditFlag = "A";
            this.bIsLastEdit = false;
            this.bShowLastFlag = true; //新增的节点有权设为最后一级
            this.editData = {
              librid: res.Data[0].librid,
              locationid: "",
              parentlocid: res.Data[0].locationid,
              parentlocname: res.Data[0].locationname + "(" + res.Data[0].locationid + ")",
              level: res.Data[0].level + 1,
              lastflag: "0",
              locationcode: "",
              locationname: "",
              seq: 0,
              description: "",
              usedesc: "",
              labgroupid: "",
              validtypeno: "",
              loctypeno: "",
              locationtemp: "",
              shelftype: "",
              shelfid: null,
              posnumber: 0,
              occupynumber: 0,
              createdt: "",
              createuser: "",
            };
          } else if (flag == "E") {
            this.EditFlag = "E";
            this.editData = res.Data[0];
            if (this.editData.shelftype) {
              this.editSmpShelfList_Options = this.tempeditSmpShelfList_Options.filter((element) => element.shelftypeno == this.editData.shelftype);
            }
            this.editData.parentlocname = res.Data[0].parentname;
            if (this.editData.lastflag == "0") this.bIsLastEdit = false;
            else this.bIsLastEdit = true;
            if ((!node.data.leaf && node.childNodes.length > 0) || this.editData.occupynumber > 0) this.bShowLastFlag = false;
            //非子节点 并且有子节点
            else this.bShowLastFlag = true;
            this.copyData = XEUtils.clone(res.Data[0], true);

          }
        }
      } catch (e) {
        this.$alert(res, "提示", {
          confirmButtonText: "确定",
          type: "error",
        });
      }
    },
    LastFlagChange() {
      //最后一级勾选
      if (this.editData.lastflag == "1") {
        //允许编辑
        this.bIsLastEdit = true;
      } else {
        //取消,可放置架子及可放置数置空。
        this.bIsLastEdit = false;
        this.editData.shelftype = "";
        this.editData.shelfid = "";
        this.editData.posnumber = 0;
        this.editData.occupynumber = 0;
      }
    },
    btnEdit(flag, obj, node) {
      console.log(flag, obj, node)
      //初始化下拉框
      this.editSmp_ShelfId();//架子类型
      this.editSmp_Library();//标本库
      this.editSmp_LocType();//库位类型
      this.editSmp_LocvaliType();//入库条件 表达式
      this.editSmp_ShelfList(flag, obj);//架子
      if (flag == "A") {
        let locationIdUp = obj.locationid;
        this.locationTitle = "样本库位置维护新增界面";
        this.detailQuery4Up(locationIdUp, flag);
        this.bLocVisable = true;
      } else if (flag == "E") {
        let locationIdUp = obj.locationid;
        this.locationTitle = "样本库位置维护修改界面";
        this.detailQuery4Up(locationIdUp, flag, node);
        this.bLocVisable = true;
      }
    },
    //工作组
    LabgroupChange(c, v) {
      this.editData.labgroupid = c;
      this.editData.labgroupname = v;
    },
    //库位温度 保留小数点后二位
    IsNumber() {
      let tmpNum = this.$tool.onlyNumber(this.editData.locationtemp);
      this.editData.locationtemp = parseFloat(tmpNum).toFixed(2);
    },
    //保存
    async btnSave() {
      if (this.EditFlag == "A") {
        this.editData.createdt = this.$pub.InitDateTime();
        this.editData.createuser = this.$tool.getSession(this.$tool.loginuserno);
      }
      if (this.editData.loctypeno == "") {
        this.$alert("请选择库位类型。", "提示", {
          confirmButtonText: "确定",
          type: "warning",
        });
        this.$refs.refloctypeno.focus();
        return false;
      }
      try {
        const res = await this.$tool.request({
          url: "SMP/SMP1/SMP133",
          method: "post",
          data: {
            action: "smp_location_addedit",
            data: this.editData,
          },
        });
        console.log("res", res);
        if (res.errcode == "1") {
          this.$message({
            message: "保存成功！",
            type: "success",
            showClose: true,
          });
          this.editData = {};
          this.bLocVisable = false;
          if (this.EditFlag == "A") {
            this.btnRefreshLoc(this.tpNode);
          } else if (this.EditFlag == "E") {
            this.btnRefreshLoc(this.prTpNode);
          }
          this.EditFlag = "M";
        } else if (res.errcode == "0") {
          this.$alert(res.obj, "提示", {
            confirmButtonText: "确定",
            type: "error",
          });
        }
      } catch (e) {
        this.$alert(e.message, "提示", {
          confirmButtonText: "确定",
          type: "error",
        });
      }
    },
    //------------------------库位分类表达式------------------------//
    //打开弹窗
    popOpen() {
      this.popData = {
        librid: this.selCodeno,
        validtypeno: "",
        validtypename: "",
        validformula: "",
        description: "",
      };
      this.editSmp_LocvaliType_Detail();
      this.validFormulaQuery();
      if (this.editData.validtypeno == "") this.bIsValidEdit = false;
      else this.bIsValidEdit = true;
      this.bLalidFormulaVisible = true;
    },
    //表达式
    async editSmp_LocvaliType() {
      try {
        this.editSmplocvalitype_Options = [];
        const res = await this.$tool
          .request({
            url: "SMP/SMP1/SMP132",
            method: "post",
            data: {
              action: "smp_locvalitype_query",
              librid: this.selCodeno,
            },
          })
          .then((res) => {
            this.editSmplocvalitype_Options = res.RData.Data;
          });
      } catch (e) {
        this.$alert(e.message, "提示", {
          confirmButtonText: "确定",
          type: "error",
        });
      }
    },
    //表达式明细
    async editSmp_LocvaliType_Detail() {
      if (this.editData.validtypeno == null) {
        this.editData.validtypeno = "";
      }
      try {
        const res = await this.$tool
          .request({
            url: "SMP/SMP1/SMP132",
            method: "post",
            data: {
              action: "smp_locvalitype_query_byid",
              validtypeno: this.editData.validtypeno,
              librid: this.selCodeno,
            },
          })
          .then((res) => {
            if (res.Data[0]) {
              this.popData = res.Data[0];
              this.formulaNData = this.popData.validformulana;
              this.formulaCData = this.popData.validformula;
            }
          });
      } catch (e) { }
    },
    //入库条件代号检测
    chkValidtypeNo() {
      let oValidtypeno = this.popData.validtypeno;
      this.$tool
        .request({
          url: "SMP/SMP1/SMP132",
          method: "post",
          data: {
            action: "chkvalidtypeno",
            validtypeno: this.popData.validtypeno,
            librid: this.selCodeno,
          },
        })
        .then((res) => {
          if (res.Item1 == "1") {
            this.popData.validtypeno = XEUtils.toInteger(res.Item2[0].maxid) + 1;
            this.$alert('入库条件代号:  <b style="color:#808080">' + oValidtypeno + '</b>  已存在，系统已为您填入推荐值:  <b style="color:#808080">' + this.popData.validtypeno + "</b> 。", { dangerouslyUseHTMLString: true });
            this.$refs.refvalidtypeno.focus();
          }
        })
        .catch((err) => {
          this.$alert(err);
        });
    },
    //快速查询 支持 字段名称 col_name,字段代码 col_code
    DocInputSearch() {
      let filterName = this.inputSearch;
      let queryList = [];
      if (filterName) {
        queryList = this.oPopXTableData.filter((item) => item.col_code.toUpperCase().indexOf(filterName.toUpperCase()) > -1 || item.col_name.toUpperCase().indexOf(filterName.toUpperCase()) > -1);
        this.popXTableData = queryList;
        if (queryList.length > 0) {
        } else {
          this.detailData = [];
        }
      } else {
        this.popXTableData = XEUtils.clone(this.oPopXTableData, true);
      }
    },
    //TXT显示框
    SpecimenChange(c, v) {
      if (this.formulaCData != "") {
        var myValue = "";
        myValue = " [smp_type] = '" + c + "'";
        this.CodePost(myValue);
      } else {
        this.formulaCData += " " + " [smp_type] = '" + c + "'" + " ";
        this.formulaNData += " " + " [样本类型] = '" + c + "'" + " ";
      }
      this.NamePost();
      this.bSpecimenVisible = false;
    },
    popPrintChangeEvent({ row }) {
      let myValue = "[" + row.col_code + "]";
      this.CodePost(myValue);
      this.NamePost();
    },
    //表达式代码
    CodePost(myValue) {
      var myField = document.getElementById("codeDiv"); //
      if (myField.selectionStart || myField.selectionStart === 0) {
        var startPos = myField.selectionStart;
        var endPos = myField.selectionEnd;
        this.formulaCData = myField.value.substring(0, startPos) + " " + myValue + " " + myField.value.substring(endPos, myField.value.length);
        this.$nextTick(() => {
          myField.selectionStart = startPos + myValue.length + 2;
          myField.selectionEnd = startPos + myValue.length + 2;
        });
        myField.focus();
        myField.setSelectionRange(myField, myField.selectionStart, myField.selectionEnd);
      } else {
        this.formulaCData += " " + myValue + " ";
      }
    },
    //表达式名称
    NamePost() {
      let codeData = this.formulaCData;
      let arr = codeData.split(" ");
      let naString = [];
      for (var i = 0, len = arr.length; i < len; i++) {
        let temp = "";
        let element = arr[i];
        if (element != "") {
          if (element.indexOf("[") > -1 && element.indexOf("]") > -1) {
            let tpel = this.GetBracketStr(element);
            let xtable = this.$refs.locvaliXTable.tableData;
            try {
              xtable.forEach((element) => {
                let item = element.col_code + "." + element.col_name;
                if (item.indexOf(tpel) > -1) {
                  let itemdata = item.split(".");
                  let col_code = itemdata[0];
                  let col_name = itemdata[1];
                  temp = "[" + col_name + "]";
                  throw Error();
                }
              });
            } catch (e) { }
            if (temp == "") {
              if (element == "[smp_type]") temp = "[样本类型]";
              else temp = element;
            }
          } else {
            temp = element;
          }
        } else {
          temp = element;
        }
        naString.push(temp);
      }
      this.formulaNData = naString.join(" ");
    },
    GetBracketStr(text) {
      let result = "";
      let regex = /\[(.+?)\]/g;
      let options = text.match(regex);
      let option = options[0];
      result = option.substring(1, option.length - 1);
      return result;
    },
    Operate(text) {
      this.tempvarible = " " + text + " ";
      if (this.formulaCData != "") {
        this.tempvarible = text;
        var myValue = this.tempvarible;
        this.CodePost(myValue);
      } else {
        this.formulaNData += this.tempvarible;
        this.formulaCData += this.tempvarible;
      }
      this.NamePost();
    },
    //清除
    popBtnClean() {
      this.formulaCData = "";
      this.formulaNData = "";
    },
    //标本类型
    popBtnSpecimen() {
      this.bSpecimenVisible = true;
    },
    //表达式内字段表
    async validFormulaQuery() {
      try {
        const res = await this.$tool.request({
          url: "SMP/SMP2/SMP210",
          method: "post",
          data: {
            action: "q_smp210_input_col",
            librid: this.selCodeno,
          },
        });
        if (res.length > 0) {
          this.popXTableData = res;
          this.oPopXTableData = XEUtils.clone(res, true);
        } else {
          this.popXTableData = [];
          this.oPopXTableData = [];
        }
      } catch (e) { }
    },
    //表达式保存
    async popSave() {
      let that = this;
      let gData = XEUtils.clone(that.popData, true);
      gData.validformula = this.formulaCData;
      if (gData.validtypeno == "") {
        this.$alert("入库条件代码不可为空！", "提示", {
          confirmButtonText: "确定",
        });
        this.$refs.refvalidtypeno.focus();
        return;
      }
      if (gData.validtypename == "") {
        this.$alert("入库条件名称不可为空！", "提示", {
          confirmButtonText: "确定",
        });
        this.$refs.refvalidtypename.focus();
        return;
      }
      if (gData.validformula == "") {
        this.$alert("库位分类表达式不可为空！", "提示", {
          confirmButtonText: "确定",
        });
        this.$refs.refformulaCData.focus();
        return;
      }
      try {
        const res = await this.$tool
          .request({
            url: "SMP/SMP1/SMP132",
            method: "post",
            data: {
              action: "smp_locvalitype_addedit",
              librid: this.selCodeno,
              data: gData,
            },
          })
          .then((res) => {
            console.log("res", res);
            if (res.errcode == "1") {
              that.$message({
                message: "保存成功！",
                type: "success",
              });
              that.popData = {};
              this.editSmplocvalitype_Options = {};
              this.editSmp_LocvaliType();
              this.$nextTick(() => {
                this.editData.validtypeno = gData.validtypeno;
                this.bLalidFormulaVisible = false;
              });
            } else {
              this.$alert(res.obj, "提示", {
                confirmButtonText: "确定",
                type: "error",
              });
            }
          });
      } catch (e) {
        this.$alert(e, "提示", {
          confirmButtonText: "确定",
          type: "error",
        });
      }
    },
    //获取可放置标本数
    GetPosNumber(c, v) {
      // this.editSmpShelf_Options.forEach((e) => {
      //     if (e.shelftypeno == c) {
      //         this.editData.posnumber = e.posnumber;
      //     }
      // });
      this.editData.shelfid = '';
      this.editSmpShelfList_Options = this.tempeditSmpShelfList_Options.filter((element) => element.shelftypeno == c);
      if (this.editSmpShelfList_Options.length == 0) {
        this.$alert('没有闲置的架子可选', "提示", {
          confirmButtonText: "确定",
          type: "error",
        });
        return false
      }
    },
    GetShelfPosNumber(c, v) {
      console.log("editSmpShelfList_Options", this.editSmpShelfList_Options);
      this.editSmpShelfList_Options.forEach((e) => {
        if (e.shelfid == c) {
          this.editData.posnumber = e.posnumber;
          this.editData.occupynumber = e.occupynumber
        }
      })
    },
    /*-----------------------------批量复制-----------------------------*/
    //初始化批量复制页面
    btnCopy(object, node) {
      this.cObject = object;
      this.cNode = node;
      if (node.parent.data.name) {
        this.cFather = XEUtils.clone(node.parent.data, true);
      }
      this.bDiagx = true;
      this.dlgCopyData = {
        startNum: 1,
        endNum: 1,
        sumNum: 1,
        showNumArr: 1,
        showNumArrNa: "一",
        bIsCn: false,
      };
      this.cNumArray = [];
      this.cCNNumArray = [];
      this.bCopyVisable = true;
    },
    GetNum() {
      //获取数字区间，计算差值和区间内所有元素。
      this.dlgCopyData.startNum = XEUtils.toInteger(this.dlgCopyData.startNum);
      this.dlgCopyData.endNum = XEUtils.toInteger(this.dlgCopyData.endNum);
      if (this.dlgCopyData.startNum && this.dlgCopyData.endNum) {
        //首末位都填写入时
        this.cNumArray = [];
        this.cCNNumArray = [];
        if (this.dlgCopyData.startNum <= this.dlgCopyData.endNum) {
          //当首位数小于末位数时
          this.dlgCopyData.sumNum = this.dlgCopyData.endNum - this.dlgCopyData.startNum + 1;
          var i = this.dlgCopyData.startNum;
          for (i; i <= this.dlgCopyData.endNum; i++) {
            this.cNumArray.push(i);
          }
          this.cNumArray.forEach((item) => {
            var cnNum = this.ToChinesNum(item);
            this.cCNNumArray.push(cnNum);
          });
          if (this.dlgCopyData.startNum == this.dlgCopyData.endNum) {
            this.dlgCopyData.showNumArr = this.dlgCopyData.startNum;
            this.dlgCopyData.showNumArrNa = this.ToChinesNum(this.dlgCopyData.startNum);
          } else {
            this.dlgCopyData.showNumArr = "[" + this.dlgCopyData.startNum + "," + this.dlgCopyData.endNum + "]";
            this.dlgCopyData.showNumArrNa = "[" + this.ToChinesNum(this.dlgCopyData.startNum) + "," + this.ToChinesNum(this.dlgCopyData.endNum) + "]";
          }
        } else {
          this.dlgCopyData.sumNum = 0;
        }
      }
    },
    ToChinesNum(num) {
      //阿拉伯数字转中文数字，上线至万。
      let changeNum = ["零", "一", "二", "三", "四", "五", "六", "七", "八", "九"]; //changeNum[0] = "零"
      let unit = ["", "十", "百", "千", "万"];
      num = parseInt(num);
      let getWan = (temp) => {
        let strArr = temp.toString().split("").reverse();
        let newNum = "";
        for (var i = 0; i < strArr.length; i++) {
          newNum = (i == 0 && strArr[i] == 0 ? "" : i > 0 && strArr[i] == 0 && strArr[i - 1] == 0 ? "" : changeNum[strArr[i]] + (strArr[i] == 0 ? unit[0] : unit[i])) + newNum;
        }
        return newNum;
      };
      let overWan = Math.floor(num / 10000);
      let noWan = num % 10000;
      if (noWan.toString().length < 4) noWan = "0" + noWan;
      return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num);
    },
    btnCopySave() {
      if (this.dlgCopyData.sumNum < 1) {
        this.$alert(
          "当前无新增数据，请检测号数填写区间。",
          "提示",
          { type: "warning" },
          {
            confirmButtonText: "确定",
          }
        );
        return false;
      } else {
        //查询到复制源的ID，查询获取其值
        this.detailQuery4Up(this.cObject.locationid, "E");
        //循环新增数据 最后添加控制
        //setTimeout(() => {
        if (!this.bIsCn) {
          //阿拉伯数字
          this.cNumArray.forEach((item) => {
            // setTimeout(() => {
            var locna = this.dlgCopyData.uhLocNa + item + this.dlgCopyData.lhLocNa;
            this.btnCSave(locna);
          });
          // }, 300);
        } else {
          //中文数字
          this.cCNNumArray.forEach((item) => {
            var locna = this.dlgCopyData.uhLocNa + item + this.dlgCopyData.lhLocNa;
            console.log("🚀 ~ file: SMP133.vue ~ line 1270 ~ this.cCNNumArray.forEach ~ locna", locna);
            setTimeout(() => {
              this.btnCSave(locna);
            });
          }, 150);
        }
        setTimeout(() => {
          this.btnRefreshLoc(this.prTpNode);
          this.cNumArray = [];
          this.cCNNumArray = [];
          this.bCopyVisable = false;
          this.dlgCopyData = {};
        }, 1000);
      }
    },
    //复制保存 （目前是循环调用保存方法 待修改）
    async btnCSave(locationname) {
      let formdata = {
        //不能复制的字段集合
        librid: this.copyData.librid,
        locationid: "",
        parentlocid: this.copyData.parentlocid,
        level: this.copyData.level + 1,
        lastflag: this.copyData.lastflag,
        locationcode: "",
        locationname: locationname, //*
        seq: this.codeData.seq,
        description: this.copyData.description,
        usedesc: this.copyData.usedesc,
        labgroupid: this.copyData.labgroupid,
        validtypeno: "", //Lis6无复制，暂时不复制
        loctypeno: this.copyData.loctypeno, //Lis6无字段，先复制
        locationtemp: this.copyData.locationtemp, //Lis6无字段，先复制
        shelftype: this.copyData.shelftype,
        shelfid: null,
        posnumber: this.copyData.posnumber,
        occupynumber: 0,
        createdt: this.$pub.InitDateTime(),
        createuser: this.$tool.getSession(this.$tool.loginuserno),
      };
      console.log("formdata", formdata);
      try {
        const res = await this.$tool
          .request({
            url: "SMP/SMP1/SMP133",
            method: "post",
            data: {
              action: "smp_location_addedit",
              data: formdata,
            },
          })
          .then((res) => {
            if (res.errcode == "1") {
              console.log("keyid", res.keyid);
            } else if (res.errcode == "0") {
              this.$alert(res.obj, "提示", {
                confirmButtonText: "确定",
                type: "error",
              });
            }
          });
      } catch (e) {
        this.$alert(e, "提示", {
          confirmButtonText: "确定",
          type: "error",
        });
      }
    },
    TargetInput() {
      this.NamePost();
    },
  },
};
</script>
<style scoped>
.pagetop {
  width: 100%;
  height: 35px;
  display: -webkit-box;
  -webkit-box-pack: left;
  -webkit-box-align: center;
  border: 1px solid #ccc;
  position: absolute;
  font-size: 12px;
  z-index: 99;
  overflow-x: auto;
  white-space: nowrap;
}

.search-title {
  margin: 0 5px 0 20px;
  font-size: 12px;
}

.pagecenter {
  position: absolute;
  top: 40px;
  width: 100%;
  left: 0;
  bottom: 0px;
  overflow: auto;
}

/* 右键Class */
.RightBack {
  background-color: white;
}

.el-tree {
  min-width: 100%;
  font-size: 14px;
  display: inline-block;
}

.tree {
  overflow-y: auto;
  overflow-x: scroll;
  height: 100%;
  border: 1px solid grey;
}

::v-deep .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
  background-color: #b6e8ff;
  font-weight: 700;
}

table.edit tr td:nth-child(odd) {
  text-align: right;
  white-space: nowrap;
}

table.edit tr td:nth-child(even) {
  text-align: left;
}

::v-deep .innerRight.el-input.el-input__inner. {
  text-align: right !important;
}

::v-deep .el-textarea__inner {
  padding: 3px 5px;
}

/* disabled 字体色 */
::v-deep .el-input.is-disabled .el-input__inner {
  color: #606266;
}

::v-deep .vxe-table .vxe-body--column.col-orange {
  background-color: #f8f8f8;
}
</style>
